xen/sched: migrate timers to correct cpus after suspend
authorJuergen Gross <jgross@suse.com>
Fri, 4 Nov 2022 08:03:23 +0000 (09:03 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 4 Nov 2022 08:03:23 +0000 (09:03 +0100)
commit37f82facd62f720fdcec104f72f86b8c6c214820
treefd6b50ce0eb64106808d56afbd55052f21bfe229
parent9f3e585ff5ecc606e386057f5cfa66b22fea2b93
xen/sched: migrate timers to correct cpus after suspend

Today all timers are migrated to cpu 0 when the system is being
suspended. They are not migrated back after resuming the system again.

This results (at least) to visible problems with the credit scheduler,
as the timer isn't handled on the cpu it was expected to occur, which
will result in an ASSERT() triggering. Other more subtle problems, like
uninterrupted elongated time slices, are probable. The least effect
will be worse performance on cpu 0 resulting from most scheduling
related timer interrupts happening there after suspend/resume.

Add migrating the scheduling related timers of a specific cpu from cpu
0 back to its original cpu when that cpu has gone up when resuming the
system.

Fixes: 0763cd268789 ("xen/sched: don't disable scheduler on cpus during suspend")
Signed-off-by: Juergen Gross <jgross@suse.com>
Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Acked-by: Dario Faggioli <dfaggioli@suse.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
xen/common/sched/core.c
xen/common/sched/cpupool.c
xen/common/sched/credit.c
xen/common/sched/private.h
xen/common/sched/rt.c